<?php
namespace Core;

require_once __Dir__ . '/../../simpletest/autorun.php';

class TestOfUpdateTask extends \UnitTestCase 
{
	/*
		Check a correct add answer
	*/
    function testCorrectUpdateTask() 
	{
		$services = new CoreService();
		$tasksResponse = $services->getAllTasks();
		$id = $tasksResponse->response[0]->Id;
		
		$result = $services->updateTask($id, 1);
		$this->assertTrue($result->isFailed == false);
    }
	
	
	/*
		Check an invalid add answer
	*/
    function testInvalidUpdateTaskByTaskNotFound() 
	{
		$services = new CoreService();
		$result = $services->updateTask(-1, 1);
		$this->assertTrue($result->isFailed);
    }
}
?>